﻿// Jeremy Lee
// Battle Tactics- A turn based strategy game
// Globl.cs- Global variables, enumerations, constants, and various custom data structures
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace BattleTactics
{
    public class Globl
    {
        public const int SCREEN_WIDTH = 800;
        public const int SCREEN_HEIGHT = 600;
        public const int TARGET_FPS = 30;
        public const int TILE_SIZE = 50;
        public const int TILES_WIDE = 16;
        public const int TILES_TALL = 12;

        public static VectorInt UP = new VectorInt(0, -1);
        public static VectorInt RIGHT = new VectorInt(1, 0);
        public static VectorInt DOWN = new VectorInt(0, 1);
        public static VectorInt LEFT = new VectorInt(-1, 0);

        public static SpriteFont font;
        public static ContentManager content;
        public static GameTime gameTime;
        public static int stage = 0;
        public static Unit[] playerArmy;
        public static Unit selected;
        public static Cursor cursor;
        public static Texture2D blank;

        public static Random rand = new Random();

        public static GamePadState gsPrev = new GamePadState();
        public static GamePadState gsCurr = new GamePadState();
        public static KeyboardState ksPrev = new KeyboardState();
        public static KeyboardState ksCurr = new KeyboardState();
    }
    public enum Stats
    {
        HP,
        HPMAX,
        ATK,
        DEF,
        RNG,
        MOV,
        EXP,
        LVL,
    }
    public enum UnitState
    {
        READY,
        MOVE,
        ATTACK,
        SELECTED,
        END,
    }
    public enum TileState
    {
        NONE,
        MOVE,
        ATTACK,
    }
    public enum LevelState
    {
        INTRO,
        PLAYERTURN,
        ENEMYTURN,
        WINLOSE,
        STOP,
    }
    public class VectorInt
    {
        public int X;
        public int Y;
        public VectorInt()
        {
            X = Y = 0;
        }
        public VectorInt(int num)
        {
            X = Y = num;
        }
        public VectorInt(int num1, int num2)
        {
            X = num1;
            Y = num2;
        }
        public static VectorInt operator +(VectorInt v1, VectorInt v2)
        {
            return new VectorInt(v1.X + v2.X, v1.Y + v2.Y);
        }
    }
    public struct SomeData
    {
        public Tile tile;
        public List<Tile> attackable;
    }
}
